<template>
    <div>
        <div class=page-title-section style=background-image:url(images/parallax-5.jpg)>
            <div class=container>
                <div class="center-holder page-title">
                    <h1>{{data.title}}</h1>
                    <p style="color: white;" >{{data.content}}</p>
                </div>
            </div>
        </div>
        <div class=section-block>
            <div class=container>
                <div class=row>
                    <div class="col-xs-12 col-md-4 col-sm-4">
                        <div class=p-detail-box><i class=icon-stopwatch-4></i><h4>时间</h4>
                            <p>{{new Date(data._createTime).Format('yyyy年MM月dd日')}}</p>
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-4 col-sm-4">
                        <div class=p-detail-box><i class=icon-user-4></i><h4>开发者</h4>
                            <p>{{data.author || '--'}}</p>
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-4 col-sm-4">
                        <div class=p-detail-box><i class=icon-notebook-1></i><h4>种类</h4>
                            <p>{{(data.type || []).join('、')}}</p>
                        </div>
                    </div>
                </div>
                <div class=p-detail-img>
                    <div v-html="data.text" ></div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        name: "ProjectsDetails",
        data() {
            return {
                data: {}
            }
        },
        mounted() {
            const prop = this.$route.query;
            if (prop.item) {
                const data = JSON.parse(decodeURIComponent(prop.item))
                this.data = data;
            }
        },
    }
</script>

<style scoped>

</style>